/* day-mon2.c */
#include <stdio.h>

int main(void)
{
	const int days[] = {31,28,31,30,31,30,31,31,30,31};
	int index;
	for (index  = 0; index < sizeof(days) / sizeof(days[0]);index++)
	    printf("Month %2d has %d days.\n",index + 1,days[index]);
	    
	    return  0;
}


// desiginate.c
#include <stdio.h>
#define MONTHS 12
int main(void)
{
	int days [MONTHS] = {31,28 , [4] =31,30,31,[1]= 29};
	int i;
	
	for (i = 0; i < MONTHS; i++)
	    printf("%2d %d\n", i + 1, days[i]);
	    
	return 0;
	
}

#include <stdio.h>
#define SIZE 4
int main(void)
{
	int some_data [SIZE] = {1492 , 1066};
	int i;
	printf("%2s%14s\n","i", "some_data[i]");
	for (i = 0; i < SIZE; i++)
	    printf("%2d%14d\n", i , some_data[i]);
	    
	return 0;
}

#include <stdio.h>
#define SIZE 4
int main(void)
{
	int value1 = 44;
	int arr[SIZE];
	int value2 = 88;
	int i;
	
	printf("value1 = %d, value2 = %d\n",value1, value2);
	for (i = -1; i <= SIZE;i++)
	    arr[i] = 2*i + 1;
	    
	for (i = -1; i < 7 ; i++)
	    printf("%2d %d\n", i ,arr[i]);
	    printf("value1 = %d, value2 = %d\n", value1, value2);
	    printf("address of arr[-1]: %p\n", &arr[-1]);
	    printf("address of arr[4]: %p\n", &arr[4]);
	    printf("address of value1 : %p\\n", &value1);
	    printf("address of value2 : %p\\n", &value2);
	    
	return 0;
}